// Placeholder selectors
%pager-radius-right {
	border-bottom-right-radius: $pager-border-radius;
	border-top-right-radius: $pager-border-radius;
}

%pager-radius-left {
	border-bottom-left-radius: $pager-border-radius;
	border-top-left-radius: $pager-border-radius;
}

%glyphicon {
	font-family: "Glyphicons Halflings";
	font-weight: 400;
	line-height: 1em;
	position: relative;
	top: .1em;
}

// Main styles
.wb-paginate-pager {
	text-align: center;

	.paginate-prev::before {
		@extend %glyphicon;

		content: "\e091";
		margin-right: .5em;
	}

	.paginate-next::after {
		@extend %glyphicon;

		content: "\e092";
		margin-left: .5em;
	}

	// Round outside borders of the "Previous" button
	.paginate-prev {
		@extend %pager-radius-left;

		margin-left: 0;
	}

	// Round outside borders of the "Next" button
	.paginate-next {
		@extend %pager-radius-right;
	}

	// Round outside borders of the last page button
	li.active:nth-last-child(2) button {
		@extend %pager-radius-right;
	}

	// Round outside borders of the first page button
	li.active:nth-child(2) button {
		@extend %pager-radius-left;
	}

	.pagination {
		& > li {
			& > button {
				background-color: $btn-default-bg;
				border: 1px solid $btn-default-border;
				color: $btn-default-color;
				margin-bottom: .5em;
				margin-left: -1px;
				padding: 10px 16px;
				position: relative;

				&:hover, &:focus {
					background-color: #d4d6da;
					border-color: #bbbfc5;
					z-index: 2;
				}

				&:focus {
					@include tab-focus;
				}
			}
		}

		& > .active {
			& > button, & > button:focus, & > button:hover {
				background-color: $brand-primary;
				border-color: $brand-primary;
				color: #fff;
				cursor: default;
				z-index: 3;
			}
		}
	}
}

html:not(.wb-disable) .wb-pgfltr-out {
	display: none !important;
}
